package com.yundasys.lab14springbootmessage.lab14springbootmessage.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @PACKAGE_NAME: com.yundasys.lab02springbootstudy.controller
 * @NAME: TestController
 * @USER: jiangta
 * @DATE: 2022/3/9
 * @TIME: 3:11 下午
 * @PROJECT_NAME: springboot-labs
 */
@RestController
@RequestMapping("/test")
public class TestController {

    private static final Logger LOGGER = LoggerFactory.getLogger(TestController.class);

    @PostMapping
    public Object test (@RequestBody String requestBody) {
        LOGGER.info("requestBody={}", requestBody);
        return requestBody;
    }
}
